package cn.yunhe.entity;

import cn.yunhe.entity.merchantsentity.MerchantsData;
import cn.yunhe.entity.userentity.UserData;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 李非凡
 * 订单实体类
 */
@Data
public class Order implements Serializable {

    //订单号
    private String oid;
    //食物集合(订单详情)
    private List<OrderCon> orderConList;
    //下单时间
    private String createDate;
    //下单用户
    private UserData userData;
    //商家号
    private MerchantsData merData;
    //订单总价
    private double totalPrice;
    //订单状态
    private int flag;
    //地址
    private String address;

    public Order() {
    }

    public Order(String oid, List<OrderCon> orderConList, String createDate, UserData userData, double totalPrice, String address) {
        this.oid = oid;
        this.orderConList = orderConList;
        this.createDate = createDate;
        this.userData = userData;
        this.totalPrice = totalPrice;
        this.address = address;
    }

    public Order(String oid, List<OrderCon> orderConList, String createDate, UserData userData, MerchantsData merData, double totalPrice, int flag, String address) {
        this.oid = oid;
        this.orderConList = orderConList;
        this.createDate = createDate;
        this.userData = userData;
        this.merData = merData;
        this.totalPrice = totalPrice;
        this.flag = flag;
        this.address = address;
    }
}
